package com.iflytek.ci.cpms.dao;

import java.util.List;

import com.iflytek.ci.cpms.domain.Team;
import com.iflytek.ci.cums.domain.Account;
import com.iflytek.framework.mybatis.extra.MyBatisDao;

/**
 * <p>
 * Team manager DB interface
 * </p>
 *
 * @author mdzhang
 * @since JDK 1.5
 */
@MyBatisDao
public interface TeamDao {
	/**
	 * get team by id
	 *
	 * @param id
	 * @return team
	 */
	Team get_teamById(long id);

	/**
	 * remove team by id
	 *
	 * @param id
	 */
	int remove_team(long id);

	/**
	 * add a new team
	 *
	 * @param team
	 */
	int add_team(Team team);

	/**
	 * get user_name by team_id
	 *
	 * @param team_id
	 * @return List<String> u_name
	 */
	List<Account> get_unameby_tid(long team_id);

	/**
	 * 根据项目删除开发团队
	 *
	 * @param project_ids 一个或者多个项目的id
	 */
	int remove_team_with_project(String[] project_ids);
    /**
     * 根据团队名称获得团队ID
     *
     * @param tname team name
     */
    long getTidByName(String tname);
}
